package com.jdjc.suject.domin.convert;

import com.jdjc.subject.infra.basic.entity.SubjectInfo;
import com.jdjc.suject.domin.entity.SubjectInfoBO;
import com.jdjc.suject.domin.entity.SubjectOptionBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 该接口使用了 @Mapper 注解。这个接口与 MapStruct 库一起使用，该库是一个 Java 注解处理器库，用于自动生成 Java 对象之间的映射代码。
 */
@Mapper
public interface SubjectInfoConverter {
    SubjectInfoConverter INSTANCE= Mappers.getMapper(SubjectInfoConverter.class);


    SubjectInfo convertBOToInfo(SubjectInfoBO subjectInfoBO);

    SubjectInfoBO convertOptionToBO(SubjectOptionBO subjectOptionBO);
    SubjectInfoBO convertOptionAndInfoToBO(SubjectOptionBO subjectOptionBO,SubjectInfo subjectInfo);
    SubjectInfoBO InfoToBO (SubjectInfo subjectInfo);
    List<SubjectInfoBO> InfoListToBOList(List<SubjectInfo> subjectInfo);

}
